package com.xiaoy.core.base.dictionary.entity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.xiaoy.core.base.util.store.config.ConfigTable;

@Entity
@Table(name=ConfigTable.Dic.DICTIONARYVALUE_TABLENAME)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class DictionaryValue extends DicBaseEntity{

	private Dictionary dic;
	private String value;

	@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY) 
	@JoinColumn(name="group_id")
	public Dictionary getDic() {
		return dic;
	}

	public void setDic(Dictionary dic) {
		this.dic = dic;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
	
}
